﻿<%@ Page Title="" Language="C#" MasterPageFile="~/views/Shared/MainContent.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Register Assembly="CKFinder" Namespace="CKFinder" TagPrefix="CKFinder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	附件管理
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
		<CKFinder:FileBrowser ID="FileBrowser1"  BasePath="/ck/ckfinder/" Width=100% ClassName="height_full" SelectFunction="ShowFileInfo" runat="server"></CKFinder:FileBrowser>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
<script type="text/javascript" src="/ck/ckfinder/ckfinder.js"></script>
<script type="text/javascript">

    // This is a sample function which is called when a file is selected in CKFinder.
    function ShowFileInfo(fileUrl, data) {
        var msg = 'The selected URL is: ' + fileUrl + '\n\n';
        // Display additional information available in the "data" object.
        // For example, the size of a file (in KB) is available in the data["fileSize"] variable.
        if (fileUrl != data['fileUrl'])
            msg += 'File url: ' + data['fileUrl'] + '\n';
        msg += 'File size: ' + data['fileSize'] + 'KB\n';
        msg += 'Last modifed: ' + data['fileDate'];

        alert(msg);
    }

$(document).ready(function() {
				var windowWidth = $(window).width();
				var windowHeight = $(window).height();
				$('iframe').css({'width': windowWidth+'px', 'height': windowHeight+'px'});
   $(window).resize(function() {
		var windowWidth = $(window).width();
		var windowHeight = $(window).height();				
		$('iframe').css({'width': windowWidth+'px', 'height': windowHeight+'px'});
   });	
});

 

	</script>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>
